{extend name="default/template/base_index" /}


{block name="area_header"}

{/block}

{block name="area_body"}
	{include file="default/Widget/topbar" /}
	<div class="admin-main container-fluid">
		{include file="default/Widget/left" /}
		<div class="admin-main-content">
			{include file="default/Widget/breadcrumb" /}
			<div class="table-responsive well">

				<div class="h4">
					{present name="parentMenu"}
					<a href="{:url('Menu/index',array('pid'=>$parentMenu['pid']))}">{$parentMenu['title']}</a>-{:L('VIEW_SUBMENU')}
					{/present}
				</div>

				<div class="controls">
					<a href="{:url('Menu/add',array('pid'=>request()->param('pid',0)))}" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
					{present name="parentMenu"}
					<a href="{:url('Menu/index',array('pid'=>$parentMenu['pid']))}" class="btn btn-default btn-sm"><i class="fa fa-reply"></i>{:L('BTN_BACK')}</a>
					{/present}
				</div>
				<table class="table table-striped table table-hover  table-condensed">
					<thead>
						<tr>
							<th>
								{:L('ID')}
							</th>
							<th>
								{:L('TITLE')}
							</th>
							<th>
								{:L('VIEW_ISHIDE')}
							</th>
							<th>
								{:L('SORT')}
							</th>
							<th>
								{:L('OPERATOR')}
							</th>
						</tr>
					</thead>
					<tbody>
						{volist name="list" id="vo"}
							<tr>
								<td>{$vo.id}</td>
								<td><a class="" href="{:url('Menu/index',array('pid'=>$vo['id']))}">{$vo.title}</a></td>
								<td>{:app\\src\\admin\\helper\\AdminFunctionHelper::yesorno($vo['hide'])}</td>
								<td>{$vo.sort}</td>
								<td>
									<!--<a href="{:url('Menu/view',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-eye"></i>{:L('BTN_VIEW')}</a>-->
									<a href="{:url('Menu/edit',array('id'=>$vo['id']))}" class="btn btn-default btn-sm"><i class="fa fa-edit"></i> {:L('BTN_EDIT')}</a>

                                    {in name="vo['id']" value="$cant_delete"}

                                        {else/}
                                        <a href="{:url('Menu/delete',array('id'=>$vo['id'],'pid'=>$vo['pid']))}" class="btn btn-danger btn-sm ajax-get confirm" ><i class="fa fa-trash-o"></i> {:L('BTN_DELETE')}</a>
								    {/in}
                                </td>
							</tr>
						{/volist}
					</tbody>
				</table>

				<div>
					{$show}
				</div>
			</div>
		</div>

	</div>
{/block}

{block name="area_footer"}

{/block}